package com.autocode.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName smile_text
 */
@TableName(value ="smile_text")
@Data
public class SmileText implements Serializable {
    /**
     * 文本id
     */
    @TableId(value = "id")
    private String id;

    /**
     * 索引id
     */
    @TableField(value = "index_id")
    private String index_id;

    /**
     * 名字
     */
    @TableField(value = "name")
    private String name;

    /**
     * 层级数量
     */
    @TableField(value = "level")
    private Integer level;

    /**
     * 文本
     */
    @TableField(value = "text_pice")
    private String text_pice;

    /**
     * 创建日期
     */
    @TableField(value = "create_time")
    private Date create_time;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        SmileText other = (SmileText) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getIndex_id() == null ? other.getIndex_id() == null : this.getIndex_id().equals(other.getIndex_id()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getLevel() == null ? other.getLevel() == null : this.getLevel().equals(other.getLevel()))
            && (this.getText_pice() == null ? other.getText_pice() == null : this.getText_pice().equals(other.getText_pice()))
            && (this.getCreate_time() == null ? other.getCreate_time() == null : this.getCreate_time().equals(other.getCreate_time()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getIndex_id() == null) ? 0 : getIndex_id().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getLevel() == null) ? 0 : getLevel().hashCode());
        result = prime * result + ((getText_pice() == null) ? 0 : getText_pice().hashCode());
        result = prime * result + ((getCreate_time() == null) ? 0 : getCreate_time().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", index_id=").append(index_id);
        sb.append(", name=").append(name);
        sb.append(", level=").append(level);
        sb.append(", text_pice=").append(text_pice);
        sb.append(", create_time=").append(create_time);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}